package com.pic.mgt.dao;

import java.sql.Timestamp;
import java.util.List;

import org.springframework.dao.DataAccessException;

public interface IBusinessTargetActionDao extends IBasicDao {
	// table 內共同的欄位名稱
	public static final String _unitName = "unit_name";
	public static final String _terminalId = "terminal_id";
	public static final String _fileName = "file_name";
	public static final String _fileSize = "file_size";
	public static final String _creatingTime = "creating_time";
	public static final String _lastTxTime = "last_transaction_time";
	
	public int updateLastTxTimeByFilename(Timestamp lastTxTime, String filename)
	throws DataAccessException;
	
	public BasicBusinessTargetActionInfoBean findBasicBusinessTargetActionInfoByUnitName(String unitName)
	throws DataAccessException;
	
	public BasicBusinessTargetActionInfoBean findBasicBusinessTargetActionInfoByFileName(String filename)
	throws DataAccessException;
	
	public List<BasicBusinessTargetActionInfoBean> findBasicBusinessTargetActionInfoListByUnitNameWithOrderByCreatingTimeDESC(String unitName)
	throws DataAccessException;
	
	public List<BasicBusinessTargetActionInfoBean> findBasicBusinessTargetActionInfoListByUnitNameAndTerminalId(String unitName, String terminalId)
	throws DataAccessException;
	
	public int updateCreatingTimeByFilename(Timestamp creatTime, String fileName) throws DataAccessException;
}
